home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
dev
/
c
/
helloworld.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-13
|
894b
|
39 lines
/*******************************************************
helloworld.c
by Mika Kuulusa ( k114636@cc.tut.fi )
(an extremely small 'helloworld' program)
'I made this just to show how EFFECTIVE C an be! ;-) '
----------------------
Compiled with: (SASC v5.10b)
lc -v -y helloworld
Linked with: (BLink v5.10b)
blink from helloworld.o to helloworld LIB lib:lc.lib lib:amiga.lib SC SD ND
(Final output file size = 232 ($000000e8) bytes)
*********************************************************/
#include <exec/types.h>
#include <exec/libraries.h>
#include <libraries/dos.h>
#include <proto/exec.h>
#include <proto/dos.h>
char txt[] = "Hello world!\n";
int __regargs main(cnt,atext)
int cnt;
char *atext;
{
if (!(DOSBase = (struct DosLibrary *)OpenLibrary("dos.library",0))) return(-1);
Write(Output(),txt,strlen(txt));
CloseLibrary((struct Library *)DOSBase);
return(0);
}